Skip to content

Publish packages to ADO azure-sdk-for-js feed#4807

Merged
timotheeguerin merged 1 commit into
mainfrom
publish-ado-feed
Jul 3, 2026
Merged

Publish packages to ADO azure-sdk-for-js feed#4807
timotheeguerin merged 1 commit into
mainfrom
publish-ado-feed

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Problem

CI (and this repo's emitter pipelines) install npm packages from the ADO feed azure-sdk-for-js (https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/), which quarantines newly released npmjs packages for 7 days. Packages currently publish only to npmjs via ESRP, so freshly released versions are not installable from the feed for a week.

Ports microsoft/typespec#11118 to this repo.

Change

Publish the built .tgz artifacts directly to the ADO feed (which bypasses the upstream quarantine) before the existing npm/ESRP publish, applying the dual-publish pattern already used by the emitter pipelines and every Azure SDK repo.

  • New eng/pipelines/templates/release/ado-feed-release.yml — mirrors esrp-release.yml; reuses create-authenticated-npmrc.yml (registry = the feed) + a npm publish --access public --tag <tag> loop.
    • Already-published versions are skipped (detects EPUBLISHCONFLICT/409), matching today's npm behavior of not republishing.
    • Genuine failures fail the pipeline so the quarantine-bypass gap is visible.
    • Gated by SkipPublishing for dry runs.
  • Edited eng/pipelines/jobs/publish-npm.yml — runs the ADO-feed step before ESRP, for both stable/latest and next/next.

Notes / follow-ups

  • Requires the pipeline identity to have publish rights on the azure-sdk-for-js feed.
  • eng/CI-only change — no changelog entry.

Packages currently publish only to npmjs via ESRP. The CI consumption
feed (azure-sdk-for-js) quarantines newly released packages for 7 days,
so freshly released packages are not installable for a week.

Publish the .tgz artifacts directly to the ADO feed (bypassing the
quarantine) before the npm/ESRP publish, matching the existing emitter
pipeline pattern. Already-published versions are skipped; genuine
failures fail the pipeline.
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

⚡ Benchmark Results

✅ No performance regressions detected.

Full details – comparing 037ef24 vs baseline rolling-baseline-d1c08a7-9aa2c21 (rolling baseline (20 main runs))
Metric Baseline Current Change
total 🔴 872.9ms 🔴 729.7ms -16.4% 🟢
loader 🟡 260.1ms 🟡 214.6ms -17.5% 🟢
resolver 🟢 32.3ms 🟢 30.8ms -4.8%
checker 🟡 305.6ms 🟡 263.5ms -13.8% 🟢
validation 🟢 70.9ms 🟢 64.9ms -8.4% 🟢
 ↳ validation/@azure-tools/typespec-azure-core 🟡 10.3ms 🟢 9.0ms -12.9% 🟢
 ↳ validation/@typespec/http 🟡 11.9ms 🟡 11.1ms -6.4%
 ↳ validation/@typespec/rest 🟢 1.3ms 🟢 1.2ms -7.9%
 ↳ validation/@typespec/versioning 🔴 44.1ms 🔴 40.6ms -7.8% 🟢
 ↳ validation/compiler 🟢 3.1ms 🟢 3.0ms -4.2%
linter 🟢 186.2ms 🟢 156.1ms -16.2% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/auth-required 🟢 0.1ms 🟢 0.1ms +1.8%
 ↳ linter/@azure-tools/typespec-azure-core/bad-record-type 🟢 0.5ms 🟢 0.5ms -0.7%
 ↳ linter/@azure-tools/typespec-azure-core/byos 🟢 7.4ms 🟢 6.1ms -18.4% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/casing-style 🟢 1.2ms 🟢 1.1ms -1.6%
 ↳ linter/@azure-tools/typespec-azure-core/composition-over-inheritance 🟢 0.1ms 🟢 0.1ms -1.0%
 ↳ linter/@azure-tools/typespec-azure-core/documentation-required 🟢 1.5ms 🟢 1.5ms -5.4%
 ↳ linter/@azure-tools/typespec-azure-core/friendly-name 🟢 1.1ms 🟢 1.0ms -7.1%
 ↳ linter/@azure-tools/typespec-azure-core/key-visibility-required 🟢 0.3ms 🟢 0.3ms -8.8%
 ↳ linter/@azure-tools/typespec-azure-core/known-encoding 🟢 0.4ms 🟢 0.4ms -10.2%
 ↳ linter/@azure-tools/typespec-azure-core/long-running-polling-operation-required 🟢 0.6ms 🟢 0.6ms -4.0%
 ↳ linter/@azure-tools/typespec-azure-core/no-case-mismatch 🟢 0.5ms 🟢 0.5ms -1.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-closed-literal-union 🟢 0.7ms 🟢 0.7ms -1.1%
 ↳ linter/@azure-tools/typespec-azure-core/no-enum 🟢 0.2ms 🟢 0.2ms +18.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-error-status-codes 🟢 0.2ms 🟢 0.2ms -1.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops 🟢 0.1ms 🟢 0.1ms -13.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-format 🟢 0.7ms 🟢 0.6ms -14.1%
 ↳ linter/@azure-tools/typespec-azure-core/no-generic-numeric 🟢 0.7ms 🟢 0.6ms -7.7%
 ↳ linter/@azure-tools/typespec-azure-core/no-header-explode 🔴 23.5ms 🟡 18.4ms -21.8% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/no-legacy-usage 🟢 1.7ms 🟢 1.6ms -6.0%
 ↳ linter/@azure-tools/typespec-azure-core/no-multiple-discriminator 🟢 0.2ms 🟢 0.2ms -8.7%
 ↳ linter/@azure-tools/typespec-azure-core/no-nullable 🟢 0.4ms 🟢 0.3ms -9.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-offsetdatetime 🟢 1.7ms 🟢 1.6ms -2.7%
 ↳ linter/@azure-tools/typespec-azure-core/no-openapi 🟢 2.2ms 🟢 1.8ms -18.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-private-usage 🟢 2.6ms 🟢 2.5ms -4.6%
 ↳ linter/@azure-tools/typespec-azure-core/no-query-explode 🔴 24.7ms 🟡 19.7ms -20.3% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/no-response-body 🔴 29.6ms 🔴 24.0ms -18.9% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/no-rest-library-interfaces 🟢 0.1ms 🟢 0.1ms +3.6%
 ↳ linter/@azure-tools/typespec-azure-core/no-route-parameter-name-mismatch 🟢 6.6ms 🟢 5.4ms -19.4% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/no-rpc-path-params 🟢 0.3ms 🟢 0.3ms -10.8%
 ↳ linter/@azure-tools/typespec-azure-core/no-string-discriminator 🟢 0.1ms 🟢 0.1ms -1.6%
 ↳ linter/@azure-tools/typespec-azure-core/no-unknown 🟢 0.3ms 🟢 0.3ms -8.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-unnamed-union 🟢 0.6ms 🟢 0.6ms -5.1%
 ↳ linter/@azure-tools/typespec-azure-core/operation-missing-api-version 🟢 0.3ms 🟢 0.3ms -5.9%
 ↳ linter/@azure-tools/typespec-azure-core/request-body-problem 🟢 0.4ms 🟢 0.4ms -10.5%
 ↳ linter/@azure-tools/typespec-azure-core/require-versioned 🟢 0.0ms 🟢 0.0ms +4.7%
 ↳ linter/@azure-tools/typespec-azure-core/response-schema-problem 🔴 28.5ms 🔴 23.5ms -17.7% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/rpc-operation-request-body 🟢 0.6ms 🟢 0.5ms -9.9%
 ↳ linter/@azure-tools/typespec-azure-core/spread-discriminated-model 🟢 0.4ms 🟢 0.4ms -9.1%
 ↳ linter/@azure-tools/typespec-azure-core/use-standard-names 🟢 6.7ms 🟢 5.4ms -19.7% 🟢
 ↳ linter/@azure-tools/typespec-azure-core/use-standard-operations 🟢 0.2ms 🟢 0.2ms -11.4%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-child-resources 🟡 15.0ms 🟢 9.3ms -38.1% 🟢
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operations 🟢 0.2ms 🟢 0.2ms -9.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-common-types-version 🟢 9.2ms 🟢 8.5ms -7.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key 🟢 0.2ms 🟢 0.2ms +3.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage 🟢 0.1ms 🟢 0.1ms +2.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes 🟢 4.3ms 🟢 4.2ms -2.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts 🟡 13.5ms 🟡 12.1ms -10.3% 🟢
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-record 🟢 0.5ms 🟢 0.6ms +6.3%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes 🟢 1.1ms 🟢 1.4ms +23.4%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes 🟢 0.1ms 🟢 0.2ms +1.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment 🟢 0.4ms 🟢 0.3ms -7.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property 🟢 0.3ms 🟢 0.3ms -1.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator 🟢 0.1ms 🟢 0.1ms +4.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb 🟢 0.1ms 🟢 0.1ms -3.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property 🟢 0.2ms 🟢 0.2ms +4.3%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format 🟢 0.2ms 🟢 0.2ms +6.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars 🟢 0.4ms 🟢 0.4ms -8.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern 🟢 0.1ms 🟢 0.1ms +13.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation 🟢 0.4ms 🟢 0.4ms -0.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response 🟢 7.4ms 🟢 6.7ms -9.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-patch 🟢 0.7ms 🟢 0.6ms -5.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars 🟢 0.3ms 🟢 0.8ms +153.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state 🟢 0.3ms 🟢 0.4ms +11.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels 🟢 0.2ms 🟢 0.2ms +5.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/empty-updateable-properties 🟢 0.3ms 🟢 0.3ms -1.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation 🟢 0.1ms 🟢 0.1ms +1.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/lro-location-header 🟡 17.2ms 🟡 13.5ms -21.5% 🟢
 ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint 🟢 0.1ms 🟢 0.1ms +6.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers 🟢 0.8ms 🟢 0.8ms +9.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-empty-model 🟢 0.2ms 🟢 0.2ms +5.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-override-props 🟢 0.2ms 🟢 0.2ms +10.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation 🟢 0.4ms 🟢 0.3ms -7.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-response-body 🔴 25.8ms 🔴 21.1ms -18.4% 🟢
 ↳ linter/@azure-tools/typespec-azure-resource-manager/patch-envelope 🟢 0.3ms 🟢 0.3ms -5.4%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/resource-name 🟢 0.3ms 🟢 0.3ms +0.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/secret-prop 🟢 4.5ms 🟢 4.1ms -10.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/unsupported-type 🟢 0.6ms 🟢 0.6ms +2.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/version-progression 🟢 0.2ms 🟢 0.2ms +19.6%
 ↳ linter/@azure-tools/typespec-client-generator-core/property-name-conflict 🟢 1.9ms 🟢 1.7ms -8.0%
 ↳ linter/@azure-tools/typespec-client-generator-core/require-client-suffix 🟢 1.1ms 🟢 1.3ms +11.3%
emit 🔴 5.76s 🔴 4.40s -23.7% 🟢
 ↳ emit/@Azure-Tools 🟢 0.0ms 🟢 0.0ms +0.0%
 ↳ emit/@azure-tools/typespec-autorest 🟢 107.8ms 🟢 91.9ms -14.7% 🟢
 ↳ emit/@azure-tools/typespec-python 🔴 2.17s 🔴 1.63s -24.9% 🟢
 ↳ emit/@typespec 🟢 0.0ms 🟢 0.0ms +0.0%
 ↳ emit/@typespec/http-client-js 🔴 524.7ms 🔴 422.2ms -19.5% 🟢
 ↳ emit/@typespec/openapi3 🟢 94.4ms 🟢 78.0ms -17.4% 🟢
 ↳ emit/@typespec/openapi3/compute 🟢 82.2ms 🟢 67.7ms -17.6% 🟢
 ↳ emit/@typespec/openapi3/write 🟢 12.1ms 🟢 10.1ms -16.4% 🟢

Averaged across 3 specs (azure-arm-resource-manager, azure-core-dataplane, azure-full).
Threshold: changes > ±5% are highlighted.
🟢 Fast · 🟡 Moderate (stages >200ms, rules >10ms) · 🔴 Slow (stages >400ms, rules >20ms)

@timotheeguerin timotheeguerin marked this pull request as ready for review July 2, 2026 19:53
@timotheeguerin timotheeguerin added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit f49cd9d Jul 3, 2026
28 checks passed
@timotheeguerin timotheeguerin deleted the publish-ado-feed branch July 3, 2026 13:23
timotheeguerin added a commit that referenced this pull request Jul 3, 2026
…ersion (#4813)

## Problem

The ADO `azure-sdk-for-js` feed publish step (added in #4807) fails when
a package version already exists in the feed:

```
npm http fetch PUT 403 .../@Azure-Tools%2fazure-http-specs
HttpErrorGeneral: 403 Forbidden - The feed 'azure-sdk-for-js' already contains file
'azure-http-specs-0.1.0-alpha.43-dev.0.tgz' in package '@azure-tools/azure-http-specs 0.1.0-alpha.43-dev.0'.
```

Azure DevOps Artifacts npm feeds are **immutable**: re-publishing an
already-existing version returns an **HTTP 403** with an `already
contains file ... in package ...` message, not the npm `409` /
`EPUBLISHCONFLICT` that the skip logic currently matches. As a result a
harmless re-publish fails the pipeline.

There is no npm flag (`--force`, `--skip-existing`) that bypasses feed
immutability, so the 403 must be tolerated explicitly.

## Change

Extend the "already published, treat as no-op" detection in
`ado-feed-release.yml` to also match the ADO immutability message
(`already contains file`, `already contains ... in package`). The match
is intentionally **specific** — a bare `403` is **not** matched — so
genuine auth/permission 403s still fail the job.

## Notes

- eng/CI-only change — no changelog entry.
- The identical template lives in `microsoft/typespec` and receives the
same fix in microsoft/typespec#11164.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants